home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Resources
/
PaperCut Quota 6.1
/
pc-setup.exe
/
{app}
/
WebAdmin
/
NetLog.asp
< prev
next >
Wrap
Text File
|
2005-07-05
|
3KB
|
81 lines
<%@ Language=VBScript %>
<%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %>
<!-- #INCLUDE FILE="includes/PCCommon.inc" -->
<%
Dim intMAX_COUNT
intMAX_COUNT = 100
%>
<!-- #INCLUDE FILE="includes/header.inc" -->
<%
Dim objPCWebNetLog
Set objPCWebNetLog = CreateObject("PCWebAdmin.PCWebNetLog")
If objPCWebNetLog.Error Then
WriteErrorMessage objPCWebNetLog.ErrorDescription
End If
Dim strUserName
strUserName = Trim(Request("strUserName"))
If Not gblnIsAdmin or Request("strMyLogs") <> "" Then
strUserName = gstrLoggedInUser
End If
If strUserName <> "" Then
objPCWebNetLog.RestrictedOnUser(Trim(strUserName))
Response.Write "<H1>" & GetTextReplace("RecentNetUsageBy", Array(strUserName)) & "</H1>"
WriteUserAdminLinks(strUserName)
Call DisplayList(False)
WriteUserAdminLinks(strUserName)
Else
'objPCWebNetLog.FullLog ' Defaults to this anyway
Response.Write "<H1>" & GetText("RecentNetUsage") & "</H1>"
Call DisplayList(True)
End If
Set objPCWebNetLog = Nothing
Sub DisplayList(blnShowUser)
Response.Write "<CENTER>" & vbCRLF
Response.Write "<TABLE class=""webAdmin"" width=""95%"" >" & vbCRLF
Response.Write "<TR>" & vbCRLF
Response.Write "<TH width=""10%"">" & GetText("Date") & "</TH>" & vbCRLF
If blnShowUser Then
Response.Write "<TH width=""30%"">" & GetText("User") & "</TH>" & vbCRLF
End If
Response.Write "<TH width=""20%"">" & GetText("DataUsed") & "</TH>" & vbCRLF
Response.Write "<TH width=""20%"">" & GetText("TimeUsed") & "</TH>" & vbCRLF
Response.Write "<TH width=""20%"">" & GetText("Cost") & "</TH>" & vbCRLF
Response.Write "</TR>" & vbCRLF
objPCWebNetLog.MoveFirst
Dim intCount
intCount = 0
do while ((not objPCWebNetLog.EOF) and intCount < intMAX_COUNT)
Response.Write "<TR class=""" & RowClassHelper(intCount) & """>" & vbCRLF
Response.Write "<TD nowrap align=left>" & objPCWebNetLog.LogDate & "</TD>" & vbCRLF
If blnShowUser Then
Response.Write "<TD nowrap align=left><a title=""" & GetTextReplace("ViewUserLogs", Array(objPCWebNetLog.UserName)) & """ href=""NetLog.asp?strUserName=" & Server.URLEncode(objPCWebNetLog.UserName) & """>" & objPCWebNetLog.UserName & "</A></TD>" & vbCRLF
End If
Response.Write "<TD align=right>" & objPCWebNetLog.TotalMBText & " " & GetText("MBAbbr") & "</TD>" & vbCRLF
Response.Write "<TD align=right>" & objPCWebNetLog.TotalNetHoursText & " " & GetText("HoursAbbr") & "</TD>" & vbCRLF
Response.Write "<TD align=right>" & objPCWebNetLog.CostText & "</TD>" & vbCRLF
Response.Write "</TR>" & vbCRLF
objPCWebNetLog.MoveNext
intCount = intCount + 1
loop
Response.Write "</TABLE>" & vbCRLF
Response.Write "</CENTER>" & vbCRLF
End Sub
%>
</CENTER>
<!-- #INCLUDE FILE="includes/footer.inc" -->